-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
quic: For streams allow ReadableStream as body #60237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@jasnell This try to add support for streams for outgoing data. I hope the PR is helpful and does not waste too much time. I have contributed long time ago 1-2 patches, but I am not that fluent with the node.js codebase. |
After the change the body parameter for all created QuicStreams can take a ReadableStream of Uint8Array, Arraybuffers etc.. We introduce a DataQueueFeeder class, that may be also used for other related mechanisms. A locally created unidirectional Stream can not have a reader. Therefore the interface is changed to handle this case. (undercovered when writing the tests). Furthermore, a ResumeStream must be added After AddStream in QuicSession, as the ResumeStream beforehand triggered with set_outbound is a no-op, as Stream was not added to Session beforehand. Fixes: nodejs#60234
10ccd9f
to
d31f2c8
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #60237 +/- ##
==========================================
+ Coverage 88.54% 88.75% +0.21%
==========================================
Files 704 704
Lines 208123 208314 +191
Branches 40006 40073 +67
==========================================
+ Hits 184280 184890 +610
+ Misses 15877 15350 -527
- Partials 7966 8074 +108
🚀 New features to boost your workflow:
|
There is a crash on some platforms. TODO for next weekend. |
After the change the body parameter for all
created QuicStreams can take a ReadableStream
of Uint8Array, Arraybuffers etc..
We introduce a DataQueueFeeder class that may be
also used for other related mechanisms.
A locally created unidirectional Stream can not
have a reader. Therefore, the interface is changed
to handle this case. (undercovered when writing
the tests).
Furthermore, a ResumeStream must be added after
AddStream in QuicSession, as the ResumeStream
beforehand triggered with set_outbound is a no-op,
as Stream was not added to Session beforehand.
Fixes: #60234